package org.sdp.pearproject.dto.convert;

import org.sdp.pearproject.dao.domain.*;
import org.sdp.pearproject.dto.request.*;
import java.util.Date;

/**
 * @ClassName: ProjectForNodeBaseRequestConvert
 * @Description:
 * @Author: SDP
 * @Date: 2022-07-21
 * @Version: 1.0
 * Table: pear_project
 * Comment:
 * 项目表
 */
public class ProjectForNodeBaseRequestConvert extends BaseConvert {
    public static ProjectForNodeBase convert(ProjectForNodeBaseRequest request) throws Exception {
        ProjectForNodeBase daoRequest = new ProjectForNodeBase();
        copyProperties(request, daoRequest);

        daoRequest.setNode(daoRequest.getNode() == null ? null : daoRequest.getNode().trim());
        daoRequest.setTitle(daoRequest.getTitle() == null ? null : daoRequest.getTitle().trim());
        daoRequest.setCreateAt(daoRequest.getCreateAt() == null ? null : daoRequest.getCreateAt().trim());
        daoRequest.setPnode(daoRequest.getPnode() == null ? null : daoRequest.getPnode().trim());
        daoRequest.setPath(daoRequest.getPath() == null ? null : daoRequest.getPath().trim());
        daoRequest.setSpl(daoRequest.getSpl() == null ? null : daoRequest.getSpl().trim());

        return daoRequest;
    }
}
